package com.ruoyi.web.controller.system;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.RegisterBody;
import com.ruoyi.framework.web.service.SysRegisterService;
import com.ruoyi.system.domain.SysProduct;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.impl.SysProductServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.print.attribute.standard.PrinterURI;

/**
 * 注册验证
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/product")
public class SysProductController extends BaseController {
    @Autowired
    private SysProductServiceImpl service;

//    @GetMapping("productList")
//    public AjaxResult productList(@RequestBody ProductAo productAo) {
//        int page = productAo.getPage();
//        int size = productAo.getSize();
//        String productName = productAo.getProductName();
//        Page<SysProduct> sysProductPage = new Page<>(page, size);
//        Page<SysProduct> page1 = service.page(sysProductPage, new LambdaQueryWrapper<SysProduct>().eq(SysProduct::getProName, productName));
//
//        return AjaxResult.success(page1);
//    }

//    @GetMapping("/productInfo/${id}")
//    public AjaxResult productInfo(@PathVariable Integer id) {
//        SysProduct byId = service.getById(id);
//        return AjaxResult.success(byId);
//    }
}
